libostree: Allow compression level to be set for archive-z2 stream
authorPhilip Withnall <withnall@endlessm.com>
Mon, 6 Mar 2017 17:48:36 +0000 (17:48 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 6 Mar 2017 18:19:45 +0000 (18:19 +0000)
commit574c3ea6f935c392da99a721907a98086eeaad44
treeb14aab1227833651ad46193942508ebc750bb3a6
parent72336f1c4885f7916be58c7bcf2501655b33e5aa
libostree: Allow compression level to be set for archive-z2 stream

Add a ostree_raw_file_to_archive_z2_stream_with_options() variant of
ostree_raw_file_to_archive_z2_stream(), to allow a compression-level
option to be passed in and passed through to zlib.

This is useful when building archive-z2 files on the fly for
transmission over a non-bandwidth-limited channel, such as a local
network. In this case, CPU time is more valuable than bandwidth, so we
want a low compression level.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #721
Approved by: cgwalters
apidoc/ostree-sections.txt
src/libostree/libostree.sym
src/libostree/ostree-core.c
src/libostree/ostree-core.h